<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('角色列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
	<div class="row">
		<div class="col-sm-12 search-collapse">
			<form id="role-form">
				<input type="hidden" th:value="${id}" id="rid">
			</form>
		</div>

		<div class="col-sm-12 select-table table-striped">
			<table id="bootstrap-table"></table>
		</div>

	</div>
</div>

	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
		// var detailFlag = [[${@permission.hasPermi('storage:ware:remove')}]];
		var prefix = ctx + "statis/Rk";
		var prefixa=ctx+"statis/view";
		$(function() {
			var options = {
				url: prefix + "/listdetail/"+$("#rid").val(),
				detailUrl: prefixa + "/details/{id}",
				modalName: "仓库",
				columns: [{
					checkbox: true
				},
					{    field: 'rkId',
						title: "序号",
						// formatter: function (value, row, index) {
						// 	return $.table.serialNumber(index);
						// }
						visible: false,
					},
					{
						title: "序号",
						formatter: function (value, row, index) {
							return $.table.serialNumber(index);
						}
					},
					{
						field: 'rkwareName',
						title: '仓库名称',
					},
					{
						field: 'poPurIndent',
						title: '采购单编号',
					},
					{
						field: 'rkstauscount',
						title: '商品数量',

					},
					{
						field: 'totalMoney',
						title: '金额',
						formatter: function (value, row, index) {
							return '￥'+value;
						}
					},
					{
						field: 'rkTime',
						title: '入库时间',

					},
					{
						title: '操作',
						align: 'center',
						formatter: function(value, row, index) {
							if (row.poPurIndent!= 0) {
								var action = [];
								action.push('<a class="btn btn-success btn-sm" style="margin-right: 5px" onclick="$.operate.detail(\''+ row.poPurIndent+'\')">查看详情</a>');
								return action.join('');
							} else {
								return "";
							}
						}
					}]
			};
			$.table.init(options);
		});

	</script>
</body>
</html>